#include <iostream>
#include "Dictionary.h"

using namespace std;

#ifdef TEST
int main (int argc, char const* argv[])
{
	Dictionary d;
	
	// test add_word
	assert(d.add_word("word") == 1);
	assert(d.add_word("another_word") == 2);
	assert(d.add_word("word") == 1);
	
	// test [] operator
	assert(d["another_word"] == 2);
	assert(d["word"] == 1); 
 	assert(d["asd"] == 0); // not present
	
	assert(d[1] == "word");
	assert(d[2] == "another_word");
	assert(d[4] == "");
	
	// test size
	assert(d.size() == 2);
	
	// test <<
	// cout << "Expected output: word 1 another_word 2" << endl;
	// cout << "Output: " << d << endl;	
	
	return 0;
}
#endif
